package com.computergames.server.server.session;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface RoomDao {
    //@Insert("insert into room(name, roomType,members, currentPlayers, maxPlayers) values(#{name}, #{roomType}, #{members},#{currentPlayers}, #{maxPlayers})")
    void addRoom(Room room);

    //@Update("update room set currentPlayers = #{currentPlayers} where name = #{name}")
    void updateCurrentPlayers(Room room);

    //@Select("select * from room where name = #{name}")
    Room findRoomByName(String name);
}
